//
//  FileUpdateUtil.h
//  UpdateFileApp
//
//  Created by PCQ on 10/02/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#define NSHybridErrorDomain  @"com.hsbc.hsbchybrid"

#define NSHybridErrorFileAlreadyExists (001)

@interface FileUpdateUtil : NSObject {

}
+(BOOL)copyFile:(NSString *)sourcePath destination:(NSString *)locationPath overwriteExisting:(BOOL)replaceExisting errorDetails:(NSError**)error;
+(BOOL)deleteFile:(NSString *)path errorDetails:(NSError **)error;
+(NSDate *)getModificationDate:(NSString *)path errorDetails:(NSError**)error;
+(NSDate *)dateFromString:(NSString *)date;

+(NSString *) getCachedResourceFolderPath:(NSString *)resourceFolderKay;
+(NSString *) createCachedResourceFolderPathInLibraryCaches:(NSString *)resourceFolderKay;

// JW [15-Oct-2012] fix iOS data storage problem
+(BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;
+(BOOL)addSkipBackupAttributeToItemAtURL_iOS501:(NSURL *)URL;

// background image support
+(BOOL) setupFolderPath:(NSString *)folerPath;
+(BOOL) copyAndReplaceWithNewFile:(NSString *)sourceFilePath targetFilePath:(NSString *)targetFilePath;

@end
